﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GMS.BIZ;

namespace Web.SetSystem
{
    public partial class WebForm6 : System.Web.UI.Page
    {
        protected void Page_LoadComplete(object sender, EventArgs e)
        {
            if (!((Account)HttpContext.Current.Session["Account"]).RoleCurrent.Equals('t') && !((Account)HttpContext.Current.Session["Account"]).RoleCurrent.Equals('c')) Response.Redirect("Default.aspx");
        }

        protected void ImgBut_updatepsw_Click(object sender, ImageClickEventArgs e)
        {
            Account myAccount = ((Account)HttpContext.Current.Session["Account"]);
            Label_result.Text = myAccount.ChangePassword(Tbx_oldpsw.Text, Tbx_newpsw.Text);
        }
    }
}
